<template>
  <div>
    <el-button type="" size="default" icon="ele-Plus">添加spu</el-button>
    <el-table border stripe style="margin: 20px 0" :data="[1, 2, 3, 4]">
      <el-table-column type="index" width="80" label="序号" />
      <el-table-column label="Spu名称"></el-table-column>
      <el-table-column label="Spu描述"></el-table-column>
      <el-table-column label="操作">
        <template v-slot="{ row }">
          <el-button type="primary" size="small" icon="ele-Plus"></el-button>
          <el-button type="primary" size="small" icon="ele-Edit"></el-button>
          <el-button type="info" size="small" icon="ele-Warning"></el-button>
          <el-button type="danger" size="small" icon="ele-Delete"></el-button>
        </template>
      </el-table-column>
    </el-table>
    <el-pagination
      v-model:page-size="pageSize"
      :page-count="pageCount"
      :pager-count="5"
      :page-sizes="[3, 5, 7, 9]"
      v-model:current-page="currentPage"
      layout=" prev, pager, next, sizes"
    />
  </div>
</template>

<script lang="ts">
import { defineComponent } from "vue";

export default defineComponent({
  name: "SpuList",
});
</script>

<script setup lang="ts">
import { ref } from "vue";

//定义页码需要的数据
//1.每页数量
const pageSize = ref(3);
//2.总页数
const pageCount = ref(0);
//3.当前页
const currentPage = ref(1);
</script>

<style scoped></style>
